﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BBPA.API
{
    public class MyHttpContent
    {
        public MyHttpContent(HttpContext context_)
        {
            _Context = context_;
        }
        public string rq(string name_)
        {
            string returnVal = "";
            if (_Context.Request.Form[name_] != null) returnVal = _Context.Request.Form[name_].ToString();
            else if (_Context.Request.QueryString[name_] != null) returnVal = _Context.Request.QueryString[name_].ToString();
            return returnVal;
        }
        public int rqInt(string name_)
        {
            string _rq = rq(name_);
            if (_rq == "") return 0;
            else return int.Parse(_rq);
        }
        public HttpContext Context { get { return _Context; } set { _Context = value; } }
        private HttpContext _Context;
    }
}